﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using LogManager.Base.Data;
using LogManager.Windows;

namespace LogManager
{
    public class CustomLogBuilder : ILogBuilder
    {
        public Base.ILog Build(Base.IServer server, string logName, string logType)
        {
            if (logType == "Windows")
            {
                return new WindowsLog(server, logName, bool.Parse(ConfigurationManager.AppSettings.Get("UseLocalStorageCache")));
            }
            else
            {
                throw new NotSupportedException("There is no valid configuration for this type");
            }

            
        }
    }
}